// pages/member/weidian/team/index.js
import { PNT, setNavBarTitle, showToast, pushPagePath, scrollLoadList } from "../../../../utils/utils";
import { MyTeam } from "../../../../utils/apis";
Page({

  /**
   * 页面的初始数据
   */
  data: {
    teamLst:[
      {
        thumb:'http://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83epjxYan4Re4P2iczpZHTNwroc9ohf89ianZ9VRnicwnQarfibgRItlr771lSGLdzVU8XYZDNKdNic7UTmA/132',
        name:'顶顶顶顶',
        time:'2019-10-10',
        jmoney:104,
        money:500,

      },
      {
        thumb: 'http://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83epjxYan4Re4P2iczpZHTNwroc9ohf89ianZ9VRnicwnQarfibgRItlr771lSGLdzVU8XYZDNKdNic7UTmA/132',
        name: '顶顶顶顶',
        time: '2019-10-10',
        jmoney: 104,
        money: 500,

      }
    ]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (opt) {
    setNavBarTitle(PNT.order.main);
    this.loginModal = this.selectComponent("#login-modal");
    var info = wx.getStorageSync('userInfo')
    this.setData({
      status: opt.status || '10',
      info: info
    });
    this.getTeam();
    // this.getCancelReason();

  },
  getTeam(){
    var data = {};
    data.user_id = this.data.info.user_id;
    MyTeam(data).then(res=>{
      this.setData({
        teamLst:res.data
      })
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})